package com.eascs.fp.uc.controller;


import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.eascs.app.log.Logger;
import com.eascs.app.log.LoggerFactory;
import com.eascs.fp.common.controller.BaseMasterViewController;
import com.eascs.fp.common.entity.MemberEntity;
import com.eascs.site.view.ViewContext;

@RequestMapping("/uc")
@Controller
public class MemberController extends BaseMasterViewController {
	private Logger logger = LoggerFactory.getLogger(this.getClass());
	
	
	@RequestMapping(value = "/login/index")
	public String loginIndex() {
		return "/uc/login";
	}
	
	@RequestMapping(value = "/register/index")
	public String regIndex() {
		return "/uc/register";
	}
	
	@RequestMapping(value = "/forgetPassword/index")
	public String forgetPwIndex() {
		return "/uc/forgetPassword";
	}
	
	@RequestMapping(value = "/aboutUs")
	public String aboutUs() {
		ViewContext.put("hotHM", "aboutUsHM");
		return "/about/aboutUs";
	}
	
	@RequestMapping(value = "/faq")
	public String FAQ() {
		return "/about/faq";
	}
	
	@RequestMapping(value = "/signOut")
	public String signOut(HttpServletRequest request) {
		HttpSession session = request.getSession();
		String sessionId=session.getId();
		session.removeAttribute(sessionId);
		ViewContext.put("member", null);
		return "/uc/login";
	}
	
	@RequestMapping(value = "/regSuccess")
	public String regSuccess() {
		return "/uc/regSuccess";
	}
	
	@RequestMapping(value = "/alertSuccess")
	public String pwdAlterSuccess() {
		return "/uc/pwdAltSuccess";
	}
	@RequestMapping(value = "/alertPassword/index")
	public String alertPwIndex() {
		return "/uc/alertPassword";
	}
	
	@RequestMapping(value = "/linkUs/index")
	public String linkUs() {
		ViewContext.put("xlm", "xlm");
		return "/about/aboutUs";
	}
	
	@RequestMapping(value = "/notFound")
	public String notFound() {
		return "/404";
	}
	@RequestMapping(value = "/modifyphone/index")
	public String modifyphone() {
		return "/uc/modifyphone";
	}
	@RequestMapping(value = "/modifyphone/next")
	public String modifyphoneNext() {
		return "/uc/modifyphoneNext";
	}
	@RequestMapping(value = "/modifyphone/Success")
	public String modifyphoneSuccess() {
		return "/uc/modifySuccess";
	}
}
